Optimal. Leaf size=41 \[ \frac {\text {ArcTan}(\sinh (x))}{a}-\frac {\sqrt {b} \text {ArcTan}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3265, 400, 209,
211} \begin {gather*} \frac {\text {ArcTan}(\sinh (x))}{a}-\frac {\sqrt {b} \text {ArcTan}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 211
Rule 400
Rule 3265
Rubi steps
\begin {align*} \int \frac {\text {sech}(x)}{a+b \cosh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\sinh (x)\right )\\ &=\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (x)\right )}{a}-\frac {b \text {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\sinh (x)\right )}{a}\\ &=\frac {\tan ^{-1}(\sinh (x))}{a}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sinh (x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 45, normalized size = 1.10 \begin {gather*} \frac {\sqrt {b} \text {ArcTan}\left (\frac {\sqrt {a+b} \text {csch}(x)}{\sqrt {b}}\right )}{a \sqrt {a+b}}+\frac {2 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(84\) vs.
\(2(33)=66\).
time = 0.73, size = 85, normalized size = 2.07
method | result | size |
default | \(\frac {2 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}-\frac {2 b \left (\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )+2 \sqrt {a}}{2 \sqrt {b}}\right )}{2 \sqrt {a +b}\, \sqrt {b}}+\frac {\arctan \left (\frac {2 \sqrt {a +b}\, \tanh \left (\frac {x}{2}\right )-2 \sqrt {a}}{2 \sqrt {b}}\right )}{2 \sqrt {a +b}\, \sqrt {b}}\right )}{a}\) | \(85\) |
risch | \(\frac {i \ln \left ({\mathrm e}^{x}+i\right )}{a}-\frac {i \ln \left ({\mathrm e}^{x}-i\right )}{a}+\frac {\sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}-\frac {2 \sqrt {-b \left (a +b \right )}\, {\mathrm e}^{x}}{b}-1\right )}{2 \left (a +b \right ) a}-\frac {\sqrt {-b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 x}+\frac {2 \sqrt {-b \left (a +b \right )}\, {\mathrm e}^{x}}{b}-1\right )}{2 \left (a +b \right ) a}\) | \(106\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 115 vs.
\(2 (33) = 66\).
time = 0.40, size = 360, normalized size = 8.78 \begin {gather*} \left [\frac {\sqrt {-\frac {b}{a + b}} \log \left (\frac {b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} - 2 \, {\left (2 \, a + 3 \, b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} - 2 \, a - 3 \, b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} - {\left (2 \, a + 3 \, b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \, {\left ({\left (a + b\right )} \cosh \left (x\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} + {\left (a + b\right )} \sinh \left (x\right )^{3} - {\left (a + b\right )} \cosh \left (x\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (x\right )^{2} - a - b\right )} \sinh \left (x\right )\right )} \sqrt {-\frac {b}{a + b}} + b}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + {\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right ) + 4 \, \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{2 \, a}, -\frac {\sqrt {\frac {b}{a + b}} \arctan \left (\frac {1}{2} \, \sqrt {\frac {b}{a + b}} {\left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}\right ) + \sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left (b \cosh \left (x\right )^{3} + 3 \, b \cosh \left (x\right ) \sinh \left (x\right )^{2} + b \sinh \left (x\right )^{3} + {\left (4 \, a + 3 \, b\right )} \cosh \left (x\right ) + {\left (3 \, b \cosh \left (x\right )^{2} + 4 \, a + 3 \, b\right )} \sinh \left (x\right )\right )} \sqrt {\frac {b}{a + b}}}{2 \, b}\right ) - 2 \, \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right )}{a}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {sech}{\left (x \right )}}{a + b \cosh ^{2}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.30, size = 208, normalized size = 5.07 \begin {gather*} \frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\left (16\,{\left (a^2\right )}^{3/2}+9\,b^2\,\sqrt {a^2}+24\,a\,b\,\sqrt {a^2}\right )}{16\,a^3+24\,a^2\,b+9\,a\,b^2}\right )}{\sqrt {a^2}}-\frac {\sqrt {b}\,\left (2\,\mathrm {atan}\left (\frac {\sqrt {b}\,{\mathrm {e}}^x\,\sqrt {a^2\,\left (a+b\right )}}{2\,a\,\left (a+b\right )}\right )+2\,\mathrm {atan}\left (\frac {4\,a^4\,{\mathrm {e}}^x+8\,a^3\,b\,{\mathrm {e}}^x+4\,a^2\,b^2\,{\mathrm {e}}^x-b\,{\mathrm {e}}^x\,\sqrt {a^2\,\left (a+b\right )}\,\sqrt {a^3+b\,a^2}+b\,{\mathrm {e}}^{3\,x}\,\sqrt {a^2\,\left (a+b\right )}\,\sqrt {a^3+b\,a^2}}{\sqrt {b}\,\sqrt {a^2\,\left (a+b\right )}\,\left (2\,a^2+2\,b\,a\right )}\right )\right )}{2\,\sqrt {a^3+b\,a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________